package com.mrjy.maintain.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.TeacherInfoTypeRel;
import com.mrjy.maintain.bo.ITeacherInfoTypeRelBo;

@RequestMapping("/maintain/teacherInfoTypeRel")
@Controller
public class TeacherInfoTypeRelController {

	@Resource
	private ITeacherInfoTypeRelBo teacherInfoTypeRelDBo;
	
	@RequestMapping("/insert")
	@ResponseBody
	public Object insert(TeacherInfoTypeRel teacherInfoTypeRel) {
		return teacherInfoTypeRelDBo.txInsert(teacherInfoTypeRel);
	}

	@RequestMapping("/deleteByIds")
	@ResponseBody
	public Object deleteByIds(int[] ids) {		
		return teacherInfoTypeRelDBo.txDeleteByIds(ids);
	}
	
		
	@RequestMapping("/updateById")
	@ResponseBody
	public Object updateById(TeacherInfoTypeRel teacherInfoTypeRel) {
		return teacherInfoTypeRelDBo.txUpdateById(teacherInfoTypeRel);
	}
	
	@RequestMapping("/queryById")
	@ResponseBody
	public Object queryById(int id) {
		return teacherInfoTypeRelDBo.queryById(id);
	}
	/**
	 * 通过老师id查询其标签
	 * @param teacherId
	 * @return
	 */
	@RequestMapping("/selectListByTeacherId")
	@ResponseBody
	public Object selectListByTeacherId(int teacherId){
		return teacherInfoTypeRelDBo.selectListByTeacherId(teacherId);
	}
	
}
